package io.renren.modules.workmanagement.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 题库
 *
 * @author yewei
 * @email sunlightcs@gmail.com
 * @date 2022-04-17 16:15:30
 */
@Data
@TableName("tb_question_bank")
public class QuestionBankEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 题库ID
	 */
	@TableId
	private Long id;
	/**
	 * 题库编号
	 */
	private Long createUser;
	/**
	 * 题库名称
	 */
	private String title;
	/**
	 * 单选数量
	 */
	private Integer radioCount;
	/**
	 * 多选数量
	 */
	private Integer multiCount;
	/**
	 * 判断数量
	 */
	private Integer judgeCount;
	/**
	 * 题库备注
	 */
	private String remark;

	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;
	/**
	 * 更新时间
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Date updateTime;

	public Integer getTotal(){
		return this.radioCount + this.multiCount + this.judgeCount;
	}
}
